const map = {
  1: "在职",
  2: "在职",
  3: "在职",
  4: "离职"
};

export default function (v) {
  const {
    contractType,
    userStatus,
    fulltimeEnrollDate,
    internshipEnrollDate,
    parttimeEnrollDate,
  } = v;
  let now = new Date();
  now = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime();
  if(contractType === 1 && now < internshipEnrollDate) return '待入职';
  else if(contractType === 2 && now < parttimeEnrollDate) return '待入职';
  else if(contractType === 3 && now < fulltimeEnrollDate) return '待入职';
  else return map[userStatus];
}